package com.share.netdisk.user.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
@TableName("sys_user")
@Schema(name = "用户表", description = "User对象")
public class User{

    @TableId(value="user_id", type = IdType.AUTO)
    @Schema(title = "用户ID",example = "1",accessMode = Schema.AccessMode.READ_ONLY)
    private Long id;
    @NotBlank(message = "用户名不能为空")
    @Schema(title = "用户名",example = "admin",required = true)
    private String username;
    @NotBlank(message = "密码不能为空")
    private String password;
    @Schema(hidden = true)
    private Integer status;
}
